﻿using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Willows.Model;

namespace Weazel.Willows.RefinedModel
{
	public class InPort
		: Weazel.Gezel.Model.InPort
	{
		private TypeRegistry typeRegistry;

		private Weazel.Willows.Model.Type type;

		public InPort(TypeRegistry typeRegistry, RefinedModel.Datapath parent, string name, Weazel.Willows.Model.Type type)
			:
			base(parent, name)
		{
			this.typeRegistry = typeRegistry;
			this.type = type;

			this.Width = type.BitWidth;
			this.Signed = false;

			this.DeclarationPosition = parent.PortRegistry.AddPort(this);
		}
	}
}
